package com.warm.pump.module.sys.dao.gen;

import java.util.List;
import java.util.Map;
import java.util.Date;
import java.math.BigDecimal;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;

import com.warm.pump.frame.gen.bean.PageBean;
import com.warm.pump.frame.gen.util.TypeCast;
import com.warm.pump.frame.gen.exception.ServiceException;
import com.warm.pump.module.sys.bean.po.gen.DictItem;
import com.warm.pump.module.sys.mapper.gen.DictItemMapper;
import com.warm.pump.module.sys.bean.po.gen.DictItemExample;

@Repository
public class DictItemDao {
    // 日志对象
    private transient Log log = LogFactory.getLog(this.getClass());
    @Autowired
    private DictItemMapper dictItemMapper;

    // 增加一个后台DictItem表

    public boolean insert(DictItem dictItem) {
        try {
            dictItemMapper.insert(dictItem);
            log.debug("后台DictItem表增加成功");
            return true;
        } catch (Exception e) {
            log.debug("后台DictItem表增加失败");
            throw new ServiceException("后台DictItem表增加失败", e);
        }
    }
    // 增加一个后台DictItem表Selective

    public boolean insertSelective(DictItem dictItem) {
        try {
            dictItemMapper.insertSelective(dictItem);
            log.debug("后台DictItem表增加成功");
            return true;
        } catch (Exception e) {
            log.debug("后台DictItem表增加失败");
            throw new ServiceException("后台DictItem表增加失败", e);
        }
    }

    // 删除一个后台DictItem表

    public boolean deleteByPrimaryKey(Long id) {
        try {
            dictItemMapper.deleteByPrimaryKey(id);
            log.debug("后台DictItem表删除成功");
            return true;
        } catch (Exception e) {
            log.debug("后台DictItem表删除失败");
            throw new ServiceException("后台DictItem表删除失败", e);
        }
    }
    // 删除一个后台DictItem表byMap

    public boolean deleteByMap(Map dictItemMap) {
        try {
            dictItemMapper.deleteByExample(createDictItemExample(dictItemMap, null, null));
            log.debug("后台DictItem根据Map删除成功");
            return true;
        } catch (Exception e) {
            log.debug("后台DictItem根据GroupID删除失败");
            throw new ServiceException("后台DictItem根据object删除失败", e);
        }
    }
    // 修改一个后台DictItem表

    public boolean updateByPrimaryKey(DictItem dictItem) {
        try {
            dictItemMapper.updateByPrimaryKey(dictItem);
            log.debug("后台DictItem表修改成功");
            return true;
        } catch (Exception e) {
            log.debug("后台DictItem表修改失败");
            throw new ServiceException("后台DictItem表修改失败", e);
        }
    }
    // 修改一个后台DictItem表Selective

    public boolean updateByPrimaryKeySelective(DictItem dictItem) {
        try {
            dictItemMapper.updateByPrimaryKeySelective(dictItem);
            log.debug("后台DictItem表修改成功");
            return true;
        } catch (Exception e) {
            log.debug("后台DictItem表修改失败");
            throw new ServiceException("后台DictItem表修改失败", e);
        }
    }
    // 修改一个后台DictItem表

    public boolean updateByMap(DictItem dictItem, Map dictItemMap) {
        try {
            dictItemMapper.updateByExample(dictItem, createDictItemExample(dictItemMap, null, null));
            log.debug("后台批量DictItem表修改成功");
            return true;
        } catch (Exception e) {
            log.debug("后台批量DictItem表修改失败");
            throw new ServiceException("后台DictItem表批量修改失败", e);
        }
    }
    // 修改一个后台DictItem表Selective

    public boolean updateByMapSelective(DictItem dictItem, Map dictItemMap) {
        try {
            dictItemMapper.updateByExampleSelective(dictItem, createDictItemExample(dictItemMap, null, null));
            log.debug("后台批量DictItem表修改成功");
            return true;
        } catch (Exception e) {
            log.debug("后台批量DictItem表修改失败");
            throw new ServiceException("后台DictItem表批量修改失败", e);
        }
    }

    // 查询一个后台DictItem表

    public DictItem selectByPrimaryKey(Long id) {
        return dictItemMapper.selectByPrimaryKey(id);
    }

    // 查询一个后台DictItem表-根据map

    public DictItem selectByMap(Map dictItemMap) {
        List<DictItem> list = getListByMap(dictItemMap);
        if (list == null || list.isEmpty()) {
            return null;
        } else {
            return list.get(0);
        }
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////
    // 查询所有后台DictItem表

    public List<DictItem> getListByMap(Map dictItemMap) {

        return dictItemMapper.selectByExample(createDictItemExample(dictItemMap, null, null));
    }

    //统计后台DictItem表数量

    public int countTotalByMap(Map dictItemMap) {

        return dictItemMapper.countByExample(createDictItemExample(dictItemMap, null, null));
    }


    public List<DictItem> getListByMapPage(Map dictItemMap, int limitStart,
                                           int limitOffset) {

        return dictItemMapper.selectByExample(createDictItemExample(dictItemMap, limitStart, limitOffset));
    }


    public PageBean getPageBeanByMap(Map dictItemMap, int pageNo, int pageSize) {
        Integer count = countTotalByMap(dictItemMap);
        PageBean pageBean = new PageBean();
        pageBean.setCount(count);
        pageBean.setPageNo(pageNo);
        pageBean.setPageSize(pageSize);
        int limitStart = pageBean.getStartNo();
        int limitOffset = pageSize;
        pageBean.setData(dictItemMapper.selectByExample(createDictItemExample(dictItemMap, limitStart, limitOffset)));
        return pageBean;
    }

    private DictItemExample createDictItemExample(Map dictItemMap, Integer limitStart, Integer limitOffset) {
        DictItemExample dictItemEx = new DictItemExample();
        DictItemExample.Criteria c = dictItemEx.createCriteria();
        Long id_null = TypeCast.getLong(dictItemMap.get("id_null"));
        Long id_notNull = TypeCast.getLong(dictItemMap.get("id_notNull"));
        Long id = TypeCast.getLong(dictItemMap.get("id"));
        Long id_not = TypeCast.getLong(dictItemMap.get("id_not"));
        Long id_greater = TypeCast.getLong(dictItemMap.get("id_greater"));
        Long id_greaterEqual = TypeCast.getLong(dictItemMap.get("id_greaterEqual"));
        Long id_less = TypeCast.getLong(dictItemMap.get("id_less"));
        Long id_lessEqual = TypeCast.getLong(dictItemMap.get("id_lessEqual"));
        List<Long> id_in = TypeCast.getLongList(dictItemMap.get("id_in"));
        List<Long> id_notIn = TypeCast.getLongList(dictItemMap.get("id_notIn"));
        Long id_between1 = TypeCast.getLong(dictItemMap.get("id_between1"));
        Long id_between2 = TypeCast.getLong(dictItemMap.get("id_between2"));
        Long id_notBetween1 = TypeCast.getLong(dictItemMap.get("id_notBetween1"));
        Long id_notBetween2 = TypeCast.getLong(dictItemMap.get("id_notBetween2"));

        if (id_null != null) {
            c.andIdIsNull();
        }
        if (id_notNull != null) {
            c.andIdIsNotNull();
        }
        if (id != null) {
            c.andIdEqualTo(id);
        }
        if (id_not != null) {
            c.andIdNotEqualTo(id_not);
        }
        if (id_greater != null) {
            c.andIdGreaterThan(id_greater);
        }
        if (id_greaterEqual != null) {
            c.andIdGreaterThanOrEqualTo(id_greaterEqual);
        }
        if (id_less != null) {
            c.andIdLessThan(id_less);
        }
        if (id_lessEqual != null) {
            c.andIdLessThanOrEqualTo(id_lessEqual);
        }
        if (id_in != null) {
            c.andIdIn(id_in);
        }
        if (id_notIn != null) {
            c.andIdNotIn(id_notIn);
        }
        if (id_between1 != null) {
            c.andIdBetween(id_between1, id_between2);
        }
        if (id_notBetween1 != null) {
            c.andIdNotBetween(id_notBetween1, id_notBetween2);
        }
        String dictCode_null = TypeCast.getString(dictItemMap.get("dictCode_null"));
        String dictCode_notNull = TypeCast.getString(dictItemMap.get("dictCode_notNull"));
        String dictCode = TypeCast.getString(dictItemMap.get("dictCode"));
        String dictCode_not = TypeCast.getString(dictItemMap.get("dictCode_not"));
        String dictCode_greater = TypeCast.getString(dictItemMap.get("dictCode_greater"));
        String dictCode_greaterEqual = TypeCast.getString(dictItemMap.get("dictCode_greaterEqual"));
        String dictCode_less = TypeCast.getString(dictItemMap.get("dictCode_less"));
        String dictCode_lessEqual = TypeCast.getString(dictItemMap.get("dictCode_lessEqual"));
        String dictCode_like = TypeCast.getString(dictItemMap.get("dictCode_like"));
        String dictCode_notLike = TypeCast.getString(dictItemMap.get("dictCode_notLike"));
        List<String> dictCode_in = TypeCast.getStringList(dictItemMap.get("dictCode_in"));
        List<String> dictCode_notIn = TypeCast.getStringList(dictItemMap.get("dictCode_notIn"));
        String dictCode_between1 = TypeCast.getString(dictItemMap.get("dictCode_between1"));
        String dictCode_between2 = TypeCast.getString(dictItemMap.get("dictCode_between2"));
        String dictCode_notBetween1 = TypeCast.getString(dictItemMap.get("dictCode_notBetween1"));
        String dictCode_notBetween2 = TypeCast.getString(dictItemMap.get("dictCode_notBetween2"));

        if (dictCode_null != null) {
            c.andDictCodeIsNull();
        }
        if (dictCode_notNull != null) {
            c.andDictCodeIsNotNull();
        }
        if (dictCode != null) {
            c.andDictCodeEqualTo(dictCode);
        }
        if (dictCode_not != null) {
            c.andDictCodeNotEqualTo(dictCode_not);
        }
        if (dictCode_greater != null) {
            c.andDictCodeGreaterThan(dictCode_greater);
        }
        if (dictCode_greaterEqual != null) {
            c.andDictCodeGreaterThanOrEqualTo(dictCode_greaterEqual);
        }
        if (dictCode_less != null) {
            c.andDictCodeLessThan(dictCode_less);
        }
        if (dictCode_lessEqual != null) {
            c.andDictCodeLessThanOrEqualTo(dictCode_lessEqual);
        }
        if (dictCode_like != null) {
            c.andDictCodeLike(dictCode_like);
        }
        if (dictCode_notLike != null) {
            c.andDictCodeNotLike(dictCode_notLike);
        }
        if (dictCode_in != null) {
            c.andDictCodeIn(dictCode_in);
        }
        if (dictCode_notIn != null) {
            c.andDictCodeNotIn(dictCode_notIn);
        }
        if (dictCode_between1 != null) {
            c.andDictCodeBetween(dictCode_between1, dictCode_between2);
        }
        if (dictCode_notBetween1 != null) {
            c.andDictCodeNotBetween(dictCode_notBetween1, dictCode_notBetween2);
        }
        String dictName_null = TypeCast.getString(dictItemMap.get("dictName_null"));
        String dictName_notNull = TypeCast.getString(dictItemMap.get("dictName_notNull"));
        String dictName = TypeCast.getString(dictItemMap.get("dictName"));
        String dictName_not = TypeCast.getString(dictItemMap.get("dictName_not"));
        String dictName_greater = TypeCast.getString(dictItemMap.get("dictName_greater"));
        String dictName_greaterEqual = TypeCast.getString(dictItemMap.get("dictName_greaterEqual"));
        String dictName_less = TypeCast.getString(dictItemMap.get("dictName_less"));
        String dictName_lessEqual = TypeCast.getString(dictItemMap.get("dictName_lessEqual"));
        String dictName_like = TypeCast.getString(dictItemMap.get("dictName_like"));
        String dictName_notLike = TypeCast.getString(dictItemMap.get("dictName_notLike"));
        List<String> dictName_in = TypeCast.getStringList(dictItemMap.get("dictName_in"));
        List<String> dictName_notIn = TypeCast.getStringList(dictItemMap.get("dictName_notIn"));
        String dictName_between1 = TypeCast.getString(dictItemMap.get("dictName_between1"));
        String dictName_between2 = TypeCast.getString(dictItemMap.get("dictName_between2"));
        String dictName_notBetween1 = TypeCast.getString(dictItemMap.get("dictName_notBetween1"));
        String dictName_notBetween2 = TypeCast.getString(dictItemMap.get("dictName_notBetween2"));

        if (dictName_null != null) {
            c.andDictNameIsNull();
        }
        if (dictName_notNull != null) {
            c.andDictNameIsNotNull();
        }
        if (dictName != null) {
            c.andDictNameEqualTo(dictName);
        }
        if (dictName_not != null) {
            c.andDictNameNotEqualTo(dictName_not);
        }
        if (dictName_greater != null) {
            c.andDictNameGreaterThan(dictName_greater);
        }
        if (dictName_greaterEqual != null) {
            c.andDictNameGreaterThanOrEqualTo(dictName_greaterEqual);
        }
        if (dictName_less != null) {
            c.andDictNameLessThan(dictName_less);
        }
        if (dictName_lessEqual != null) {
            c.andDictNameLessThanOrEqualTo(dictName_lessEqual);
        }
        if (dictName_like != null) {
            c.andDictNameLike(dictName_like);
        }
        if (dictName_notLike != null) {
            c.andDictNameNotLike(dictName_notLike);
        }
        if (dictName_in != null) {
            c.andDictNameIn(dictName_in);
        }
        if (dictName_notIn != null) {
            c.andDictNameNotIn(dictName_notIn);
        }
        if (dictName_between1 != null) {
            c.andDictNameBetween(dictName_between1, dictName_between2);
        }
        if (dictName_notBetween1 != null) {
            c.andDictNameNotBetween(dictName_notBetween1, dictName_notBetween2);
        }
        Long groupId_null = TypeCast.getLong(dictItemMap.get("groupId_null"));
        Long groupId_notNull = TypeCast.getLong(dictItemMap.get("groupId_notNull"));
        Long groupId = TypeCast.getLong(dictItemMap.get("groupId"));
        Long groupId_not = TypeCast.getLong(dictItemMap.get("groupId_not"));
        Long groupId_greater = TypeCast.getLong(dictItemMap.get("groupId_greater"));
        Long groupId_greaterEqual = TypeCast.getLong(dictItemMap.get("groupId_greaterEqual"));
        Long groupId_less = TypeCast.getLong(dictItemMap.get("groupId_less"));
        Long groupId_lessEqual = TypeCast.getLong(dictItemMap.get("groupId_lessEqual"));
        List<Long> groupId_in = TypeCast.getLongList(dictItemMap.get("groupId_in"));
        List<Long> groupId_notIn = TypeCast.getLongList(dictItemMap.get("groupId_notIn"));
        Long groupId_between1 = TypeCast.getLong(dictItemMap.get("groupId_between1"));
        Long groupId_between2 = TypeCast.getLong(dictItemMap.get("groupId_between2"));
        Long groupId_notBetween1 = TypeCast.getLong(dictItemMap.get("groupId_notBetween1"));
        Long groupId_notBetween2 = TypeCast.getLong(dictItemMap.get("groupId_notBetween2"));

        if (groupId_null != null) {
            c.andGroupIdIsNull();
        }
        if (groupId_notNull != null) {
            c.andGroupIdIsNotNull();
        }
        if (groupId != null) {
            c.andGroupIdEqualTo(groupId);
        }
        if (groupId_not != null) {
            c.andGroupIdNotEqualTo(groupId_not);
        }
        if (groupId_greater != null) {
            c.andGroupIdGreaterThan(groupId_greater);
        }
        if (groupId_greaterEqual != null) {
            c.andGroupIdGreaterThanOrEqualTo(groupId_greaterEqual);
        }
        if (groupId_less != null) {
            c.andGroupIdLessThan(groupId_less);
        }
        if (groupId_lessEqual != null) {
            c.andGroupIdLessThanOrEqualTo(groupId_lessEqual);
        }
        if (groupId_in != null) {
            c.andGroupIdIn(groupId_in);
        }
        if (groupId_notIn != null) {
            c.andGroupIdNotIn(groupId_notIn);
        }
        if (groupId_between1 != null) {
            c.andGroupIdBetween(groupId_between1, groupId_between2);
        }
        if (groupId_notBetween1 != null) {
            c.andGroupIdNotBetween(groupId_notBetween1, groupId_notBetween2);
        }
        Integer orderNum_null = TypeCast.getInteger(dictItemMap.get("orderNum_null"));
        Integer orderNum_notNull = TypeCast.getInteger(dictItemMap.get("orderNum_notNull"));
        Integer orderNum = TypeCast.getInteger(dictItemMap.get("orderNum"));
        Integer orderNum_not = TypeCast.getInteger(dictItemMap.get("orderNum_not"));
        Integer orderNum_greater = TypeCast.getInteger(dictItemMap.get("orderNum_greater"));
        Integer orderNum_greaterEqual = TypeCast.getInteger(dictItemMap.get("orderNum_greaterEqual"));
        Integer orderNum_less = TypeCast.getInteger(dictItemMap.get("orderNum_less"));
        Integer orderNum_lessEqual = TypeCast.getInteger(dictItemMap.get("orderNum_lessEqual"));
        List<Integer> orderNum_in = TypeCast.getIntegerList(dictItemMap.get("orderNum_in"));
        List<Integer> orderNum_notIn = TypeCast.getIntegerList(dictItemMap.get("orderNum_notIn"));
        Integer orderNum_between1 = TypeCast.getInteger(dictItemMap.get("orderNum_between1"));
        Integer orderNum_between2 = TypeCast.getInteger(dictItemMap.get("orderNum_between2"));
        Integer orderNum_notBetween1 = TypeCast.getInteger(dictItemMap.get("orderNum_notBetween1"));
        Integer orderNum_notBetween2 = TypeCast.getInteger(dictItemMap.get("orderNum_notBetween2"));

        if (orderNum_null != null) {
            c.andOrderNumIsNull();
        }
        if (orderNum_notNull != null) {
            c.andOrderNumIsNotNull();
        }
        if (orderNum != null) {
            c.andOrderNumEqualTo(orderNum);
        }
        if (orderNum_not != null) {
            c.andOrderNumNotEqualTo(orderNum_not);
        }
        if (orderNum_greater != null) {
            c.andOrderNumGreaterThan(orderNum_greater);
        }
        if (orderNum_greaterEqual != null) {
            c.andOrderNumGreaterThanOrEqualTo(orderNum_greaterEqual);
        }
        if (orderNum_less != null) {
            c.andOrderNumLessThan(orderNum_less);
        }
        if (orderNum_lessEqual != null) {
            c.andOrderNumLessThanOrEqualTo(orderNum_lessEqual);
        }
        if (orderNum_in != null) {
            c.andOrderNumIn(orderNum_in);
        }
        if (orderNum_notIn != null) {
            c.andOrderNumNotIn(orderNum_notIn);
        }
        if (orderNum_between1 != null) {
            c.andOrderNumBetween(orderNum_between1, orderNum_between2);
        }
        if (orderNum_notBetween1 != null) {
            c.andOrderNumNotBetween(orderNum_notBetween1, orderNum_notBetween2);
        }
        String status_null = TypeCast.getString(dictItemMap.get("status_null"));
        String status_notNull = TypeCast.getString(dictItemMap.get("status_notNull"));
        String status = TypeCast.getString(dictItemMap.get("status"));
        String status_not = TypeCast.getString(dictItemMap.get("status_not"));
        String status_greater = TypeCast.getString(dictItemMap.get("status_greater"));
        String status_greaterEqual = TypeCast.getString(dictItemMap.get("status_greaterEqual"));
        String status_less = TypeCast.getString(dictItemMap.get("status_less"));
        String status_lessEqual = TypeCast.getString(dictItemMap.get("status_lessEqual"));
        String status_like = TypeCast.getString(dictItemMap.get("status_like"));
        String status_notLike = TypeCast.getString(dictItemMap.get("status_notLike"));
        List<String> status_in = TypeCast.getStringList(dictItemMap.get("status_in"));
        List<String> status_notIn = TypeCast.getStringList(dictItemMap.get("status_notIn"));
        String status_between1 = TypeCast.getString(dictItemMap.get("status_between1"));
        String status_between2 = TypeCast.getString(dictItemMap.get("status_between2"));
        String status_notBetween1 = TypeCast.getString(dictItemMap.get("status_notBetween1"));
        String status_notBetween2 = TypeCast.getString(dictItemMap.get("status_notBetween2"));

        if (status_null != null) {
            c.andStatusIsNull();
        }
        if (status_notNull != null) {
            c.andStatusIsNotNull();
        }
        if (status != null) {
            c.andStatusEqualTo(status);
        }
        if (status_not != null) {
            c.andStatusNotEqualTo(status_not);
        }
        if (status_greater != null) {
            c.andStatusGreaterThan(status_greater);
        }
        if (status_greaterEqual != null) {
            c.andStatusGreaterThanOrEqualTo(status_greaterEqual);
        }
        if (status_less != null) {
            c.andStatusLessThan(status_less);
        }
        if (status_lessEqual != null) {
            c.andStatusLessThanOrEqualTo(status_lessEqual);
        }
        if (status_like != null) {
            c.andStatusLike(status_like);
        }
        if (status_notLike != null) {
            c.andStatusNotLike(status_notLike);
        }
        if (status_in != null) {
            c.andStatusIn(status_in);
        }
        if (status_notIn != null) {
            c.andStatusNotIn(status_notIn);
        }
        if (status_between1 != null) {
            c.andStatusBetween(status_between1, status_between2);
        }
        if (status_notBetween1 != null) {
            c.andStatusNotBetween(status_notBetween1, status_notBetween2);
        }
        Date statusDate_null = TypeCast.getDate(dictItemMap.get("statusDate_null"));
        Date statusDate_notNull = TypeCast.getDate(dictItemMap.get("statusDate_notNull"));
        Date statusDate = TypeCast.getDate(dictItemMap.get("statusDate"));
        Date statusDate_not = TypeCast.getDate(dictItemMap.get("statusDate_not"));
        Date statusDate_greater = TypeCast.getDate(dictItemMap.get("statusDate_greater"));
        Date statusDate_greaterEqual = TypeCast.getDate(dictItemMap.get("statusDate_greaterEqual"));
        Date statusDate_less = TypeCast.getDate(dictItemMap.get("statusDate_less"));
        Date statusDate_lessEqual = TypeCast.getDate(dictItemMap.get("statusDate_lessEqual"));
        List<Date> statusDate_in = TypeCast.getDateList(dictItemMap.get("statusDate_in"));
        List<Date> statusDate_notIn = TypeCast.getDateList(dictItemMap.get("statusDate_notIn"));
        Date statusDate_between1 = TypeCast.getDate(dictItemMap.get("statusDate_between1"));
        Date statusDate_between2 = TypeCast.getDate(dictItemMap.get("statusDate_between2"));
        Date statusDate_notBetween1 = TypeCast.getDate(dictItemMap.get("statusDate_notBetween1"));
        Date statusDate_notBetween2 = TypeCast.getDate(dictItemMap.get("statusDate_notBetween2"));

        if (statusDate_null != null) {
            c.andStatusDateIsNull();
        }
        if (statusDate_notNull != null) {
            c.andStatusDateIsNotNull();
        }
        if (statusDate != null) {
            c.andStatusDateEqualTo(statusDate);
        }
        if (statusDate_not != null) {
            c.andStatusDateNotEqualTo(statusDate_not);
        }
        if (statusDate_greater != null) {
            c.andStatusDateGreaterThan(statusDate_greater);
        }
        if (statusDate_greaterEqual != null) {
            c.andStatusDateGreaterThanOrEqualTo(statusDate_greaterEqual);
        }
        if (statusDate_less != null) {
            c.andStatusDateLessThan(statusDate_less);
        }
        if (statusDate_lessEqual != null) {
            c.andStatusDateLessThanOrEqualTo(statusDate_lessEqual);
        }
        if (statusDate_in != null) {
            c.andStatusDateIn(statusDate_in);
        }
        if (statusDate_notIn != null) {
            c.andStatusDateNotIn(statusDate_notIn);
        }
        if (statusDate_between1 != null) {
            c.andStatusDateBetween(statusDate_between1, statusDate_between2);
        }
        if (statusDate_notBetween1 != null) {
            c.andStatusDateNotBetween(statusDate_notBetween1, statusDate_notBetween2);
        }
        String remark_null = TypeCast.getString(dictItemMap.get("remark_null"));
        String remark_notNull = TypeCast.getString(dictItemMap.get("remark_notNull"));
        String remark = TypeCast.getString(dictItemMap.get("remark"));
        String remark_not = TypeCast.getString(dictItemMap.get("remark_not"));
        String remark_greater = TypeCast.getString(dictItemMap.get("remark_greater"));
        String remark_greaterEqual = TypeCast.getString(dictItemMap.get("remark_greaterEqual"));
        String remark_less = TypeCast.getString(dictItemMap.get("remark_less"));
        String remark_lessEqual = TypeCast.getString(dictItemMap.get("remark_lessEqual"));
        String remark_like = TypeCast.getString(dictItemMap.get("remark_like"));
        String remark_notLike = TypeCast.getString(dictItemMap.get("remark_notLike"));
        List<String> remark_in = TypeCast.getStringList(dictItemMap.get("remark_in"));
        List<String> remark_notIn = TypeCast.getStringList(dictItemMap.get("remark_notIn"));
        String remark_between1 = TypeCast.getString(dictItemMap.get("remark_between1"));
        String remark_between2 = TypeCast.getString(dictItemMap.get("remark_between2"));
        String remark_notBetween1 = TypeCast.getString(dictItemMap.get("remark_notBetween1"));
        String remark_notBetween2 = TypeCast.getString(dictItemMap.get("remark_notBetween2"));

        if (remark_null != null) {
            c.andRemarkIsNull();
        }
        if (remark_notNull != null) {
            c.andRemarkIsNotNull();
        }
        if (remark != null) {
            c.andRemarkEqualTo(remark);
        }
        if (remark_not != null) {
            c.andRemarkNotEqualTo(remark_not);
        }
        if (remark_greater != null) {
            c.andRemarkGreaterThan(remark_greater);
        }
        if (remark_greaterEqual != null) {
            c.andRemarkGreaterThanOrEqualTo(remark_greaterEqual);
        }
        if (remark_less != null) {
            c.andRemarkLessThan(remark_less);
        }
        if (remark_lessEqual != null) {
            c.andRemarkLessThanOrEqualTo(remark_lessEqual);
        }
        if (remark_like != null) {
            c.andRemarkLike(remark_like);
        }
        if (remark_notLike != null) {
            c.andRemarkNotLike(remark_notLike);
        }
        if (remark_in != null) {
            c.andRemarkIn(remark_in);
        }
        if (remark_notIn != null) {
            c.andRemarkNotIn(remark_notIn);
        }
        if (remark_between1 != null) {
            c.andRemarkBetween(remark_between1, remark_between2);
        }
        if (remark_notBetween1 != null) {
            c.andRemarkNotBetween(remark_notBetween1, remark_notBetween2);
        }
        String cssStyle_null = TypeCast.getString(dictItemMap.get("cssStyle_null"));
        String cssStyle_notNull = TypeCast.getString(dictItemMap.get("cssStyle_notNull"));
        String cssStyle = TypeCast.getString(dictItemMap.get("cssStyle"));
        String cssStyle_not = TypeCast.getString(dictItemMap.get("cssStyle_not"));
        String cssStyle_greater = TypeCast.getString(dictItemMap.get("cssStyle_greater"));
        String cssStyle_greaterEqual = TypeCast.getString(dictItemMap.get("cssStyle_greaterEqual"));
        String cssStyle_less = TypeCast.getString(dictItemMap.get("cssStyle_less"));
        String cssStyle_lessEqual = TypeCast.getString(dictItemMap.get("cssStyle_lessEqual"));
        String cssStyle_like = TypeCast.getString(dictItemMap.get("cssStyle_like"));
        String cssStyle_notLike = TypeCast.getString(dictItemMap.get("cssStyle_notLike"));
        List<String> cssStyle_in = TypeCast.getStringList(dictItemMap.get("cssStyle_in"));
        List<String> cssStyle_notIn = TypeCast.getStringList(dictItemMap.get("cssStyle_notIn"));
        String cssStyle_between1 = TypeCast.getString(dictItemMap.get("cssStyle_between1"));
        String cssStyle_between2 = TypeCast.getString(dictItemMap.get("cssStyle_between2"));
        String cssStyle_notBetween1 = TypeCast.getString(dictItemMap.get("cssStyle_notBetween1"));
        String cssStyle_notBetween2 = TypeCast.getString(dictItemMap.get("cssStyle_notBetween2"));

        if (cssStyle_null != null) {
            c.andCssStyleIsNull();
        }
        if (cssStyle_notNull != null) {
            c.andCssStyleIsNotNull();
        }
        if (cssStyle != null) {
            c.andCssStyleEqualTo(cssStyle);
        }
        if (cssStyle_not != null) {
            c.andCssStyleNotEqualTo(cssStyle_not);
        }
        if (cssStyle_greater != null) {
            c.andCssStyleGreaterThan(cssStyle_greater);
        }
        if (cssStyle_greaterEqual != null) {
            c.andCssStyleGreaterThanOrEqualTo(cssStyle_greaterEqual);
        }
        if (cssStyle_less != null) {
            c.andCssStyleLessThan(cssStyle_less);
        }
        if (cssStyle_lessEqual != null) {
            c.andCssStyleLessThanOrEqualTo(cssStyle_lessEqual);
        }
        if (cssStyle_like != null) {
            c.andCssStyleLike(cssStyle_like);
        }
        if (cssStyle_notLike != null) {
            c.andCssStyleNotLike(cssStyle_notLike);
        }
        if (cssStyle_in != null) {
            c.andCssStyleIn(cssStyle_in);
        }
        if (cssStyle_notIn != null) {
            c.andCssStyleNotIn(cssStyle_notIn);
        }
        if (cssStyle_between1 != null) {
            c.andCssStyleBetween(cssStyle_between1, cssStyle_between2);
        }
        if (cssStyle_notBetween1 != null) {
            c.andCssStyleNotBetween(cssStyle_notBetween1, cssStyle_notBetween2);
        }
        String cssClass_null = TypeCast.getString(dictItemMap.get("cssClass_null"));
        String cssClass_notNull = TypeCast.getString(dictItemMap.get("cssClass_notNull"));
        String cssClass = TypeCast.getString(dictItemMap.get("cssClass"));
        String cssClass_not = TypeCast.getString(dictItemMap.get("cssClass_not"));
        String cssClass_greater = TypeCast.getString(dictItemMap.get("cssClass_greater"));
        String cssClass_greaterEqual = TypeCast.getString(dictItemMap.get("cssClass_greaterEqual"));
        String cssClass_less = TypeCast.getString(dictItemMap.get("cssClass_less"));
        String cssClass_lessEqual = TypeCast.getString(dictItemMap.get("cssClass_lessEqual"));
        String cssClass_like = TypeCast.getString(dictItemMap.get("cssClass_like"));
        String cssClass_notLike = TypeCast.getString(dictItemMap.get("cssClass_notLike"));
        List<String> cssClass_in = TypeCast.getStringList(dictItemMap.get("cssClass_in"));
        List<String> cssClass_notIn = TypeCast.getStringList(dictItemMap.get("cssClass_notIn"));
        String cssClass_between1 = TypeCast.getString(dictItemMap.get("cssClass_between1"));
        String cssClass_between2 = TypeCast.getString(dictItemMap.get("cssClass_between2"));
        String cssClass_notBetween1 = TypeCast.getString(dictItemMap.get("cssClass_notBetween1"));
        String cssClass_notBetween2 = TypeCast.getString(dictItemMap.get("cssClass_notBetween2"));

        if (cssClass_null != null) {
            c.andCssClassIsNull();
        }
        if (cssClass_notNull != null) {
            c.andCssClassIsNotNull();
        }
        if (cssClass != null) {
            c.andCssClassEqualTo(cssClass);
        }
        if (cssClass_not != null) {
            c.andCssClassNotEqualTo(cssClass_not);
        }
        if (cssClass_greater != null) {
            c.andCssClassGreaterThan(cssClass_greater);
        }
        if (cssClass_greaterEqual != null) {
            c.andCssClassGreaterThanOrEqualTo(cssClass_greaterEqual);
        }
        if (cssClass_less != null) {
            c.andCssClassLessThan(cssClass_less);
        }
        if (cssClass_lessEqual != null) {
            c.andCssClassLessThanOrEqualTo(cssClass_lessEqual);
        }
        if (cssClass_like != null) {
            c.andCssClassLike(cssClass_like);
        }
        if (cssClass_notLike != null) {
            c.andCssClassNotLike(cssClass_notLike);
        }
        if (cssClass_in != null) {
            c.andCssClassIn(cssClass_in);
        }
        if (cssClass_notIn != null) {
            c.andCssClassNotIn(cssClass_notIn);
        }
        if (cssClass_between1 != null) {
            c.andCssClassBetween(cssClass_between1, cssClass_between2);
        }
        if (cssClass_notBetween1 != null) {
            c.andCssClassNotBetween(cssClass_notBetween1, cssClass_notBetween2);
        }
        if (dictItemMap.get("orderBy") != null) {
            dictItemEx.setOrderByClause((String) dictItemMap.get("orderBy"));
        }
        if (limitStart != null && limitOffset != null) {
            dictItemEx.setLimitStart(limitStart);
            dictItemEx.setLimitOffset(limitOffset);
        }

        return dictItemEx;
    }
}
